package com.ruoyi.supplier.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.supplier.mapper.TbProductPackMapper;
import com.ruoyi.supplier.domain.TbProductPack;
import com.ruoyi.supplier.service.ITbProductPackService;

/**
 * 包装Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-06-18
 */
@Service
public class TbProductPackServiceImpl implements ITbProductPackService 
{
    @Autowired
    private TbProductPackMapper tbProductPackMapper;

    /**
     * 查询包装
     * 
     * @param packId 包装ID
     * @return 包装
     */
    @Override
    public TbProductPack selectTbProductPackById(Long packId)
    {
        return tbProductPackMapper.selectTbProductPackById(packId);
    }

    /**
     * 查询包装列表
     * 
     * @param tbProductPack 包装
     * @return 包装
     */
    @Override
    public List<TbProductPack> selectTbProductPackList(TbProductPack tbProductPack)
    {
        return tbProductPackMapper.selectTbProductPackList(tbProductPack);
    }

    /**
     * 新增包装
     * 
     * @param tbProductPack 包装
     * @return 结果
     */
    @Override
    public int insertTbProductPack(TbProductPack tbProductPack)
    {
        return tbProductPackMapper.insertTbProductPack(tbProductPack);
    }

    /**
     * 修改包装
     * 
     * @param tbProductPack 包装
     * @return 结果
     */
    @Override
    public int updateTbProductPack(TbProductPack tbProductPack)
    {
        return tbProductPackMapper.updateTbProductPack(tbProductPack);
    }

    /**
     * 批量删除包装
     * 
     * @param packIds 需要删除的包装ID
     * @return 结果
     */
    @Override
    public int deleteTbProductPackByIds(Long[] packIds)
    {
        return tbProductPackMapper.deleteTbProductPackByIds(packIds);
    }

    /**
     * 删除包装信息
     * 
     * @param packId 包装ID
     * @return 结果
     */
    @Override
    public int deleteTbProductPackById(Long packId)
    {
        return tbProductPackMapper.deleteTbProductPackById(packId);
    }

    @Override
    public List<TbProductPack> selectTbProductPackByProductId(Long productId) {
        return tbProductPackMapper.selectTbProductPackByProductId(productId);
    }
}
